//package com.game.ws;
//
//import io.netty.channel.Channel;
//import io.netty.channel.ChannelHandler;
//import io.netty.channel.ChannelInitializer;
//import io.netty.channel.socket.SocketChannel;
//import io.netty.handler.codec.http.HttpObjectAggregator;
//import io.netty.handler.codec.http.HttpServerCodec;
//import io.netty.handler.stream.ChunkedWriteHandler;
//import io.netty.handler.timeout.IdleStateHandler;
//import java.util.concurrent.TimeUnit;
//
//public class WebSocketChildChannelHandler extends ChannelInitializer<SocketChannel> {
//    protected void initChannel(SocketChannel ch) throws Exception {
//        ch.pipeline().addLast("idleStateHandler", (ChannelHandler)new IdleStateHandler(30L, 0L, 0L, TimeUnit.SECONDS));
//        ch.pipeline().addLast("http-codec", (ChannelHandler)new HttpServerCodec());
//        ch.pipeline().addLast("aggregator", (ChannelHandler)new HttpObjectAggregator(65536));
//        ch.pipeline().addLast("http-chunked", (ChannelHandler)new ChunkedWriteHandler());
//        ch.pipeline().addLast("encoder", (ChannelHandler)new WebSocketMessageEncoder());
//        ch.pipeline().addLast("handler", (ChannelHandler)new WebSocketServerHandler());
//    }
//}
